const Router = require('koa-router');
const {db, Op,QueryTypes } = require("../../models/db");
const router = new Router();

// 查询商品库存
router.post('/app/getUnit', async ctx => {
    let list = await db.query(`select name as value, name as label from unit order by sort `, {type: QueryTypes.SELECT});
    return ctx.suc('', list)

})

module.exports = router;
